# Create Fig. 2
library(here)
source(here("analysis", "visibility", "analysis_config.R"))
source(here("R", "load_functions.R"))

load(here("data", "output", "fig_proximity_effect_recognition.RData"))
load(here("data", "output", "fig_proximity_effect_credit.RData"))
load(here("data", "output", "fig_perceived_benefits_pid.rdata"))
load(here("data", "output", "fig_proximity_effect_benefit.RData"))
#+ p.benefit
p.combined <- p.recognition  + p.credit +
 plot_layout(ncol = 2) +
  plot_annotation(tag_levels = "A")
save_pnas_pdf(
  p.combined, 
  here("output", "pnas", "figures", "fig_2_proximity_effect_combined.pdf"), 
  width = "double",
  height = 6
  )
